Don't start a drag if we loose the grab.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 8 Oct 2004 19:00:57 +0000 (19:00 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 8 Oct 2004 19:00:57 +0000 (19:00 +0000)
2004-10-08  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktreeview.c (gtk_tree_view_grab_notify): Don't start a
drag if we loose the grab.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktreeview.c

index 58369375134019ebc530188741976e1429b39e23..ea5a864f9e10c7c691d711adcd1d25d75ae16f02 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-10-08  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreeview.c (gtk_tree_view_grab_notify): Don't start a 
+       drag if we loose the grab.
+
        * gtk/gtkfilechooserdefault.c (renderer_edited_cb): Set the cell 
        renderer to inert mode to avoid bug #154921.  This fixes a crash
        which would otherwise occur if the editing is stopped for the second
index 58369375134019ebc530188741976e1429b39e23..ea5a864f9e10c7c691d711adcd1d25d75ae16f02 100644 (file)
@@ -1,5 +1,8 @@
 2004-10-08  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreeview.c (gtk_tree_view_grab_notify): Don't start a 
+       drag if we loose the grab.
+
        * gtk/gtkfilechooserdefault.c (renderer_edited_cb): Set the cell 
        renderer to inert mode to avoid bug #154921.  This fixes a crash
        which would otherwise occur if the editing is stopped for the second
index 58369375134019ebc530188741976e1429b39e23..ea5a864f9e10c7c691d711adcd1d25d75ae16f02 100644 (file)
@@ -1,5 +1,8 @@
 2004-10-08  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreeview.c (gtk_tree_view_grab_notify): Don't start a 
+       drag if we loose the grab.
+
        * gtk/gtkfilechooserdefault.c (renderer_edited_cb): Set the cell 
        renderer to inert mode to avoid bug #154921.  This fixes a crash
        which would otherwise occur if the editing is stopped for the second
index 58369375134019ebc530188741976e1429b39e23..ea5a864f9e10c7c691d711adcd1d25d75ae16f02 100644 (file)
@@ -1,5 +1,8 @@
 2004-10-08  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreeview.c (gtk_tree_view_grab_notify): Don't start a 
+       drag if we loose the grab.
+
        * gtk/gtkfilechooserdefault.c (renderer_edited_cb): Set the cell 
        renderer to inert mode to avoid bug #154921.  This fixes a crash
        which would otherwise occur if the editing is stopped for the second
index 19784432b28eb94168cb90f0c4acf55f018b56fc..1eb1a3e9bb1f6a0dd90043b738e4857e7f240632 100644 (file)
@@ -190,6 +190,8 @@ static gint     gtk_tree_view_focus                (GtkWidget        *widget,
 static void     gtk_tree_view_grab_focus           (GtkWidget        *widget);
 static void     gtk_tree_view_style_set            (GtkWidget        *widget,
                                                    GtkStyle         *previous_style);
+static void     gtk_tree_view_grab_notify          (GtkWidget        *widget,
+                                                   gboolean          was_grabbed);
 
 /* container signals */
 static void     gtk_tree_view_remove               (GtkContainer     *container,
@@ -531,6 +533,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
   widget_class->focus = gtk_tree_view_focus;
   widget_class->grab_focus = gtk_tree_view_grab_focus;
   widget_class->style_set = gtk_tree_view_style_set;
+  widget_class->grab_notify = gtk_tree_view_grab_notify;
 
   /* GtkContainer signals */
   container_class->remove = gtk_tree_view_remove;
@@ -12998,4 +13001,13 @@ gtk_tree_view_set_row_separator_func (GtkTreeView                *tree_view,
 }
 
   
+static void
+gtk_tree_view_grab_notify (GtkWidget *widget,
+                          gboolean   was_grabbed)
+{
+  GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
+
+  if (!was_grabbed)
+    tree_view->priv->pressed_button = -1;
+}